﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcApplication1.Models.Customer>>" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Execute the Code
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Customers</h2>
    <table>
        <thead>
            <tr><th>Company name</th></tr>
        </thead>
        <% foreach (var customer in Model)
           { %>
           <tr>
                <td><%= Html.ActionLink(customer.CompanyName, "CustomerDetail", new RouteValueDictionary { { "id", customer.CustomerID } }) %></td>
           </tr>
        <% } %>
    </table>
</asp:Content>
